{include file="index/header" /}
<link rel="stylesheet" type="text/css" href="__PUBLIC__css/jedate.css">
<script type="text/javascript" src="__PUBLIC__js/jquery.jedate.min.js"></script>
<body>
<div class="panel admin-panel">
<form method="post" action="" id="listform">
  <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong></div>
  <div class="padding border-bottom">
    <ul class="search" style="padding-left:10px;">
        <li>搜索：</li>
        <li>
          <input type="search" placeholder="手机号/邮箱" name="phone" value="{$phone}" class="input"  style="width:250px; line-height:17px;display:inline-block;"/>
          <a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a></li>
      </ul>
  </div>
  <table class="table table-hover text-center">
    <tr>
      <th>序号</th>
      <th>用户ID</th>
      <th>昵称</th>
      <th>手机号</th>
      <th>注册时间</th>
      <th>注册来源</th>
    </tr>
    {foreach name='data' item='v' key='k'}
    <tr>
      <td>{$k+1}</td>
      <td><input type="checkbox" name="user_id[]" value="{$v.know_user_id}" />{$v.know_user_id}</td>
      <td>{$v.know_nickname}</td>
      <td>{if $v.know_phone}{$v.know_phone}{else}{$v.know_email}{/if}</td>
      <td>{$v.register_time}</td>
      <td>{if $v.action eq 0}PC{elseif $v.action eq 1}手机{else}小程序{/if}</td>
    </tr>
    {/foreach}
  </table>
</div>
</form>
</body></html>
<script>
  //搜索
function documents(){  
    $("#listform").submit();
}

function changesearch(){
  $("#listform").attr('action',"{:url('classes/stu_show',['class_id'=>$class_id])}");    //通过jquery为action属性赋值
    $("#listform").submit();    //提交ID为myform的表单
}

  //全选
$("#checkall").click(function(){ 
  $("input[name='user_id[]']").each(function(){
    if (this.checked) {
      this.checked = false;
    }
    else {
      this.checked = true;
    }
  });
});
$(".jcDate").jeDate({
      format:"YYYY-MM-DD",
      isTime:false, 
      minDate:"2014-09-19 00:00:00"
  });
</script>